﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>Matrix Admin</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="~/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="~/css/uniform.css" />
    <link rel="stylesheet" href="~/css/select2.css" />
    <link rel="stylesheet" href="~/css/matrix-style2.css" />
    <link rel="stylesheet" href="~/css/matrix-media.css" />
    <style>
        .disabled {
            background-color:#ddddff;
            color:red;
        }
        table {
            color:black;
            font-weight:bold;
        }
    </style>
</head>
<body>
    <div id="content">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                        <div class="widget-box">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>账号</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @for (int i = 0; i < HttpContext.Current.Application.Keys.Count; i++)
                                    {
                                        <tr>
                                            <td>@(i+1)</td>
                                            <td>@HttpContext.Current.Application[i]</td>
                                            <td>
                                                <button class="btn-mini btn-success" onclick="removeUser('@HttpContext.Current.Application[i]')">清除在线记录</button>
                                            </td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>
                </div>
            </div>
        </div>
    </div>

    <script src="~/js/jquery.min.js"></script>
    <script src="~/js/jquery.ui.custom.js"></script>
    <script src="~/js/bootstrap.min.js"></script>
    <script src="~/js/jquery.uniform.js"></script>
    <script src="~/js/select2.min.js"></script>
    <script src="~/js/jquery.dataTables.min.js"></script>
    <script src="~/js/matrix.js"></script>
    <script src="~/js/matrix.tables.js"></script>
    <script type="text/javascript">

        function removeUser(i) {
            $.post("/config/removeuser", { userName: i }, function (msg) {
                if (msg.IsSuccess) {
                    window.location.reload();
                } else {
                    alert("清除失败！");
                }
            });
        }
    </script>
</body>
</html>
